package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * CmanagerListId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class CmanagerListId implements java.io.Serializable {

	// Fields

	private Integer majorId;
	private Integer minorId;
	private Integer managerId;

	// Constructors

	/** default constructor */
	public CmanagerListId() {
	}

	/** full constructor */
	public CmanagerListId(Integer majorId, Integer minorId, Integer managerId) {
		this.majorId = majorId;
		this.minorId = minorId;
		this.managerId = managerId;
	}

	// Property accessors

	@Column(name = "major_id")
	public Integer getMajorId() {
		return this.majorId;
	}

	public void setMajorId(Integer majorId) {
		this.majorId = majorId;
	}

	@Column(name = "minor_id")
	public Integer getMinorId() {
		return this.minorId;
	}

	public void setMinorId(Integer minorId) {
		this.minorId = minorId;
	}

	@Column(name = "manager_id")
	public Integer getManagerId() {
		return this.managerId;
	}

	public void setManagerId(Integer managerId) {
		this.managerId = managerId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof CmanagerListId))
			return false;
		CmanagerListId castOther = (CmanagerListId) other;

		return ((this.getMajorId() == castOther.getMajorId()) || (this
				.getMajorId() != null && castOther.getMajorId() != null && this
				.getMajorId().equals(castOther.getMajorId())))
				&& ((this.getMinorId() == castOther.getMinorId()) || (this
						.getMinorId() != null && castOther.getMinorId() != null && this
						.getMinorId().equals(castOther.getMinorId())))
				&& ((this.getManagerId() == castOther.getManagerId()) || (this
						.getManagerId() != null
						&& castOther.getManagerId() != null && this
						.getManagerId().equals(castOther.getManagerId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMajorId() == null ? 0 : this.getMajorId().hashCode());
		result = 37 * result
				+ (getMinorId() == null ? 0 : this.getMinorId().hashCode());
		result = 37 * result
				+ (getManagerId() == null ? 0 : this.getManagerId().hashCode());
		return result;
	}

}